import request from '../utils/request';

export const fetchDataCustom = customParam => {
    return request(customParam);
};

export const getCommunityAuthCount = query => {
    return request({
        url: '/home/all/getCommunityAuthCount',
        method: 'post'
    });
};
export const getHomeAuthUserVo = query => {
    return request({
        url: '/home/all/getHomeAuthUserVo',
        method: 'post'
    });
};

export function getHomeMessage(data) {
    return request({
        url: '/home/all/getHomeMessage',
        method: 'post',
        data: data,
    })
}

export const getHomeTimeRegionVo = query => {
    return request({
        url: '/home/all/getHomeTimeRegionVo',
        method: 'post'
    });
};
export function getTotalCount(data) {
    return request({
        url: '/home/all/getTotalCount',
        method: 'post'
    })
}

export function getBlockAuthCount(data) {
    return request({
        url: '/home/all/getBlockAuthCount',
        method: 'post'
    })
}
export function getHomeAreaRegionVo(data) {
    return request({
        url: '/home/all/getHomeAreaRegionVo',
        method: 'post'
    })
}
export function getHomeBlockDoingVo(data) {
    return request({
        url: '/home/all/getHomeBlockDoingVo',
        method: 'post'
    })
}

export function getHomeDoingVo(data) {
    return request({
        url: '/home/all/getHomeDoingVo',
        method: 'post'
    })
}
export function readAllMessage(data) {
    return request({
        url: '/home/all/batch/read/message',
        method: 'post',
        data: data
    })
}

export function readMessage(data) {
    let url = data.url.replace("{id}", data.id);
    return request({
        url: url,
        method: 'get',
    });
}
export function cuban(data) {
    let url = data.url.replace("{areaId}", data.areaId);
    return request({
        url: url,
        method: 'get',
    });
}

export function getYiRenZheng(data) {
    return request({
        url: '/home/all/getHomeAreaRegionAuthVo',
        method: 'post',
    });
}
